#ifndef _CTYPES_H_
#define _CTYPES_H_

#define ZEROPAD                             (1)  // Pad with zero
#define SIGN                                (2)  // Unsigned/signed long
#define PLUS                                (4)  // Show plus
#define SPACE                               (8)  // Space if plus
#define LEFT                                (16) // Left justified
#define SPECIAL                             (32) // 0x
#define LARGE                               (64) // Use 'ABCDEF' instead of 'abcdef'
#define LOWER_DIGITS                        "0123456789abcdefghijklmnopqrstuvwxyz"
#define UPPER_DIGITS                        "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define MAX_DIGITS                          (15)

#define DOUBLE_ZERO                         ((double)0.1)
#define IS_DOUBLE_ZERO(D)                   (D <= DOUBLE_ZERO && D >= -DOUBLE_ZERO)

#define isdigit(c)                          ((c) >= '0' && (c) <= '9')
#define isxdigit(c)                         (isdigit(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
#define isspace(a)                          ((unsigned)(a - 9) < 5u || ' ' == a)

#endif
